home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group02b.txt
/
000007_icon-group-sender_Fri Aug 16 16:13:56 2002.msg
< prev
next >
Wrap
Internet Message Format
|
2003-01-02
|
3KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id g7GNDrE22997
for icon-group-addresses; Fri, 16 Aug 2002 16:13:54 -0700 (MST)
Message-Id: <200208162313.g7GNDrE22997@baskerville.CS.Arizona.EDU>
From: jenjhiz@yahoo.com (Gene Kahn)
X-Newsgroups: comp.lang.icon
Subject: Re: What about "Expressions?" (was Re: Icon Wish List)
Date: 16 Aug 2002 08:38:22 -0700
X-Complaints-To: groups-abuse@google.com
To: icon-group@cs.arizona.edu
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Hrvoje Blazevic <hrvoje@despammed.com> wrote in message news:<pan.2002.08.15.23.16.43.204175.3145@despammed.com>...
> On Thu, 15 Aug 2002 18:53:13 +0200, Christopher Browne wrote:
[snip]
>
> Imperative languages use statements -- which results in flow of
> information between different parts of program being passed in the
> form of a variable assignment.
>
> Statements do not return values, they have side-effects, most notably
> assignment to variables that describe the state of the computation at
> any given moment.
>
This is not without its advantage, of course. In particular, in terms
of readability, I find that explicit variables allow my mind to
'close' (I'm not using it in the technical sense of "closure")
previous statements. On the other hand, in reading s-expression
languages like Lisp and Scheme, I find that I have to hold in my mind
too many _unstated_ intermediate results before I find what the
expression is all about. (One could argue that this may be due more to
bad code, i.e., irresponsible use of deep embedding, than to intrinsic
properties of s-expressions). Compare the readability of these chunks
of code:
FORTRAN-like
The man kicked the dog.
The dog chased the cat.
The cat bit the mouse.
The mouse died.
LISP-like (in infix notation)
The mouse the cat the dog the man kicked chased bit died.
Of course, variable-less, assignment-less languages have advantages.
Speaking of speaking (or writing) grammatical English, which skill has
been implied in a recent post as a 'requisite' for programming, what
do readers with good English grammar think of this sentence:
grammatically correct or not? Be careful with your answer. Your
reputation as a programmer is on the line.
The horse raced past the barn collapsed.
> Although Icon *is* imperative language it can get away with less state
> variables than most, simply because it uses expressions which return
> values. Therefore smaller chunks of code in Icon do not have to
> describe state as the set of variables.
>
> I may be getting over my head here, because I'm *not* an Icon
> programmer. I did get briefly involved with Icon about 10 years ago,
> just after several years of down and dirty imperative programming
> using Pascal and C/C++. At that time I read "The Icon Programming
> Language" (2nd edition), and was instantly drawn to Icon.
> Unfortunately at about the same time my son reached fourth
> grade, and I wanted to start him on a road to CS, so I started looking
> at Logo.
>
> After that, the road was clear; Logo, Lisp (emacs lisp), Scheme and Haskell.
>
> I do not think that I'll ever go back to Icon, but I still sometimes
> check the web site, nostalgia ... probably :-)